package com.hutao.manage.service;

import java.util.List;
import java.util.Map;

import org.apache.ibatis.annotations.Param;

import com.hutao.manage.query.MedRecordQuery;
import com.hutao.manage.query.MedicalSearchQuery;

/**
 * 病案检索service
 *
 */
public interface MedicalRecordRetrievalService {

	/**
	 * 根据条件检索病案查询信息
	 * @param medicalSearchQuery
	 * @return
	 */
	List<Map<String,Object>> selectMedicalRecordRetrievaList(MedicalSearchQuery medicalSearchQuery);

	/**
	 * 查询未扫描数据
	 * @param medicalSearchQuery
	 * @return
	 */
	List<Map<String, Object>> selectUnScanMedicalRecordList(MedicalSearchQuery medicalSearchQuery);

	/**
	 * 查询已扫描数据信息
	 * @param medicalSearchQuery
	 * @return
	 */
	List<Map<String, Object>> selectScanMedicalRecordList(MedicalSearchQuery medicalSearchQuery);


	/**
	 * 根据firstGuid查询文件上传记录
	 * @param firstGuid
	 * @return
	 */
	int getUploadScanByFirstGuid(String firstGuid);
	
	/**
	 * 病案评价分页
	 * @param params
	 * @return
	 */
	public List<Map<String, Object>> ajaxQualityEvaluationPage(MedRecordQuery params);
	
	/**
	 * 病案评价分页总记录数
	 * @param params
	 * @return
	 */
	public long ajaxQualityEvaluationPageTotalCount(MedRecordQuery params);
	
	
	/**
	 * 根据firstGuid查询病案信息
	 * @param firstGuid
	 * @return
	 */
	Map<String,Object> getMedRecordByFirstGuid(String firstGuid);
	
	
	 /**
	  * 病案首页评价
	  * @param params
	  * @return
	  */
	 List<Map<String, Object>> ajaxFirstQualityEvaluationPage(MedRecordQuery params);
	
	 /**
	  * 病案首页评价总数
	  * @param params
	  * @return
	  */
	 long ajaxFirstQualityEvaluationPageTotalCount(MedRecordQuery params);
	
	 
	 /**
	  * 查询出院总数和质控数量计算质控率
	  * @param params
	  * @return
	  */
	Map<String,Object> getMedRecordQualityRate(MedRecordQuery params);
	
	
	 /**
	  * 根据出院时间和科室查询各个科室出院数量
	  * @param medRecordQuery
	  * @return
	  */
	 List<Map<String,Object>> getOutHospitalNumByOfficeAndOutTime(MedRecordQuery medRecordQuery);

	 
	 List<Map<String,Object>> getTreatmentTraceByCodeAndGuid(Integer code,String guid);
	
	 
	 List<Integer> getPrintPageByPrintType(Integer printTypeId);
	 
	 int selectMedApplyCount();
	 
}
